#include "reg52.h"

code unsigned char Seg_Table[] = 
{
0xc0, //0
0xf9, //1
0xa4, //2
0xb0, //3
0x99, //4
0x92, //5
0x82, //6
0xf8, //7
0x80, //8
0x90, //9
0x88, //A
0x83, //b
0xc6, //C
0xa1, //d
0x86, //E
0x8e,//F
0xbf
};

unsigned int count_f;
unsigned int dat_f;
unsigned char count_t;


void Init_Timer()
{
		TH0 = 0xff;
		TL0 = 0xff;
	
	  TH1 = (65536 - 50000) / 256;
		TL1 = (65536 - 50000) % 256;
		
	TMOD = 0x16;
	EA = 1;
	ET0 = 1;
	ET1 = 1;
	
	TR0 = 1;
	TR1 = 0;
	
}

void ServerT0() interrupt 1
{
	count_f++;
}

void ServerT1() interrupt 3
{
	  TH1 = (65536 - 50000) / 256;
		TL1 = (65536 - 50000) % 256;
		count_t++;
		if(count_t == 20)
		{
			dat_f = count_f;
			count_t = 0;
			count_f = 0;
		}
}



void  main()
{
	while(1)
	{
		
	}
	
	
}